From 6f62a116818d051c39aac61a6c59fbdf91aefeae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20M=C3=BCllner?= Date: Fri, 31 Oct 2025 18:13:54 +0100 Subject: [PATCH] extensions-app: Use one-shot idle/timeout functions gjs now provides overrides for GLib's one-shot idle/timeout functions, so use them to save a bit of code and clearly indicate that a callback is only invoked once. Part-of: --- subprojects/extensions-app/js/extensionManager.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subprojects/extensions-app/js/extensionManager.js b/subprojects/extensions-app/js/extensionManager.js index 3150af364..7914aad20 100644 --- a/subprojects/extensions-app/js/extensionManager.js +++ b/subprojects/extensions-app/js/extensionManager.js @@ -412,12 +412,11 @@ export const ExtensionManager = GObject.registerClass({ if (this._updatesCheckId) return; - this._updatesCheckId = GLib.timeout_add_seconds( + this._updatesCheckId = GLib.timeout_add_seconds_once( GLib.PRIORITY_DEFAULT, 1, () => { this.notify('n-updates'); delete this._updatesCheckId; - return GLib.SOURCE_REMOVE; }); } }); -- 2.39.5